package pers.course.week1;

import java.util.Scanner;

public class Pi_Che {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int shu = s.nextInt();
        double a = 0;
        int b = 0;
        b = (shu + 1) / 2;
        for (double i = 0; i < b; i++) {
            if (i % 2 == 0) {
                a = a + 1 / (2 * i + 1);
            }
            if (i % 2 == 1) {
                a = a - 1 / (2 * i + 1);
            }
        }
        double result = 4.0 * a;
        System.out.printf("%.6f%n", result);
    }
}
